package messages;

import java.io.Serializable;
import java.util.ArrayList;

public class ServerServerMessage implements Serializable {
	private static final long serialVersionUID = 1101010010011L;
	public static final int SERVERLIST = 0;
	public static final int MESSAGE = 1;

	private ArrayList<ServerParameters> serverList;
	private ClientServerChatMessage clientServerChatMessage;
	private int MessageType;
	private ServerParameters sender;
	private int counter;
	private String nick = " ";

	public ServerServerMessage(ClientServerChatMessage clientServerChatMessage,
			String nick, ServerParameters parameters) {
		this.clientServerChatMessage = clientServerChatMessage;
		this.MessageType = MESSAGE;
		this.sender = parameters;
		this.counter = 0;
		this.nick = nick;
	}

	public ServerServerMessage(ArrayList<ServerParameters> serverList,
			ServerParameters parameters) {
		this.serverList = serverList;
		
		this.MessageType = SERVERLIST;
		this.counter = 0;
		this.sender = parameters;
	}

	public ArrayList<ServerParameters> getServerList() {
		return serverList;
	}

	public ClientServerChatMessage getClientServerChatMessage() {
		return clientServerChatMessage;
	}

	public int getMessageType() {
		return MessageType;
	}

	public ServerParameters getParameters() {
		return sender;
	}

	public int getCounter() {
		return counter;
	}

	public void incrementCounter() {
		this.counter = this.counter + 1;
	}

	public String getNick() {
		return nick;
	}
}
